{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install transformers\n",
    "\n",
    "from transformers import pipeline\n",
    "\n",
    "# Define the text to be summarized\n",
    "text = \"The blue-throated macaw (Ara glaucogularis) is a species of macaw that is endemic to a small area of north-central Bolivia, known as the Llanos de Moxos. Recent population and range estimates suggest that about 350 to 400 individuals remain in the wild. Its demise was brought on by nesting competition, avian predation, and a small native range, exacerbated by indigenous hunting and capture for the pet trade. Although plentiful in captivity, it is critically endangered in the wild and protected by trading prohibitions. In 2014, the species was designated a natural patrimony of Bolivia. This blue-throated macaw in flight was photographed at Loro Parque, on the Spanish island of Tenerife in the Canary Islands.\"\n",
    "\n",
    "# Instantiate the summarization pipeline\n",
    "summarizer = pipeline(\"summarization\")\n",
    "\n",
    "# Generate a summary of the text\n",
    "summary = summarizer(text, max_length=100, min_length=30, do_sample=False)[0][\"summary_text\"]\n",
    "\n",
    "# Print the summary\n",
    "print(summary)"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
